# 测试downloadpicture模块
import os.path
import sys
sys.path.append('../src/downloadpicture.py')
from src import downloadpicture

ProjectDir = os.path.dirname(os.path.realpath(sys.argv[0])) + '/'
DataFile = ProjectDir + 'picturedata'

def read_file():
    info = []
    with open(DataFile,'r',encoding='utf-8') as f:
        for mumber in f.read().split('\n'):
            if mumber:
                info.append(mumber)
    return info


if __name__ == '__main__':
    pictureurl = read_file()
    title = '测试标题'
    downloadpicture.main(title, pictureurl)